import { BaseApi } from "@/api-services/apis/baseApi";
import { DictData } from "@/api-services/models/system";

/**
 * 字典数据Api
 */
class SysDictDataApi extends BaseApi<DictData.SysDictData, DictData.SysDictData, DictData.SysDictData> {
  getDatalistByType = async (category: string) => {
    return this.normalGet<Array<DictData.SysDictData>>(`/listByType`, { category: category });
  };
  getDatalistByTypeId = async (id: number) => {
    return this.normalGet<Array<DictData.SysDictData>>(`/listByTypeId`, { dictTypeId: id });
  };
}

export default new SysDictDataApi("/system/dictData");
